In a wireless sensor network or an ad hoc network, the environment for node communication and node location may often change, so data is generally distributed by using an on-demand routing manner. The basic idea of the on-demand routing is to establish a route according to a demand of sending data packets.
In the prior art, an AODV (Ad hoc On-Demand Vector, Ad hoc On-Demand Vector) routing algorithm is a common on-demand routing method. According to this method, a source node broadcasts a route request command in the beginning. Different commands broadcasted reach a destination node through different routes. The destination node selects the route of the lowest cost as a final route. In the AODV, each route in a route entry is distributed and stored on each node in the route. In other words, each node stores only an address of a next-hop node that is passed through to reach the destination node.
Since the storage capability of the network node is limited, and especially for the wireless sensor network, the cost of the node is low and the storage capability of the node is poorer, and the number of network nodes is large, so not all the route entries are stored generally. Moreover, since the route may change, an aging operation should be performed on the stored route entry, that is, the route entry obtained after route discovery has an effective time. The effective time is generally preset and obtained when the node joins in the network. For one node, a uniform effective time is used for all route entries. The route entry may be deleted after the effective time is exceeded, so that more space may be adapted for storing new route entries. If the source node tries to communicate with the destination node after the route entry is deleted, a route discovery process needs to be initiated again to re-establish the route.
Currently, the application of the network bearer becomes more diverse, especially for the wireless sensor network. According to the prior art, the uniform aging operation is performed on all the route entries. In this case, actual available route entries may be deleted.